#include<iostream>
using namespace std;
int main()
{int n,a[100];
 while(cin>>n)
 {if(n==0) break;
  for(int i=1;i<=n;i++)
      cin>>a[i];
  int sum=0;
  for(int j=1;j<=n;j++)
     sum+=a[j];
  if(sum%2!=0)  {cout<<"No equal partitioning."<<endl;continue;}
  int k=1,s=0;
  while(s<sum/2)
   {s+=a[k];
    k=k+1;}
  if(s==sum/2)
                 {cout<<"Sam stops at position "<<k-1<<" and Ella stops at position "<<k<<"."<<endl;}
           else cout<<"No equal partitioning."<<endl;
 }
system("pause");
return 0;
}
